package com.mathdroid.model.abilities.specs.sniper;

import com.mathdroid.model.abilities.Ability;
import com.mathdroid.model.enums.EDmgType;

public final class Followthrough extends Ability {

	/**
	 * Generated UID.
	 */
	private static final long serialVersionUID = -2707526827017502807L;

	public Followthrough() {
		this.setName("Followthrough");
		this.setRequiredTalent("Followthrough");
		this.setIconName("followthrough");
		this.setResource("Energy");
		this.setCost(10d);
		this.setCooldownMs(9000d);
		this.setDirectDamageType(EDmgType.ENERGY);
		this.setStandardHealthPercentMax(0.227);
		this.setStandardHealthPercentMin(0.227);	
		this.setAmountModifierPercent(0.51);
		this.setCoefficient(2.27);
		
		this.setTrainableLevel(30);
	}
	
	@Override
	public String getDescription() {
		return "Fires a well-controlled follow-up shot at the target " +
		"that deals " + this.getMinDirect() + " - " + this.getMaxDirect() 
		+ " weapon damage. Only usable within " +
		"the 4.5 seconds immediately following a Snipe or Ambush.";
	}

	@Override
	public double getMinPeriodic() {
		return 0d;
	}

	@Override
	public double getMaxPeriodic() {
		return 0d;
	}

	@Override
	public double getMinDirect() {
		return
			this.getAmountModifierPercent() 
			* this.getCharStats().getRangedDamagePrimaryMin()
		
			+ this.getCoefficient() 
			* this.getCharStats().getTotalBonusDamageTechForce()
		
			+ this.getStandardHealthPercentMin() 
			* this.getStdDmg();
	}

	@Override
	public double getMaxDirect() {
		return
			this.getAmountModifierPercent() 
			* this.getCharStats().getRangedDamagePrimaryMax()
		
			+ this.getCoefficient() 
			* this.getCharStats().getTotalBonusDamageTechForce()
		
			+ this.getStandardHealthPercentMax() 
			* this.getStdDmg();
	}

}
